package com.ns.dcjh.ui.adapter;

import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ns.dcjh.R;

public class BrowserItemAdapter extends BaseQuickAdapter<ResolveInfo, BaseViewHolder>{


    public BrowserItemAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, ResolveInfo item) {
        helper.setText(R.id.itemBrowserName,item.loadLabel(mContext.getPackageManager()).toString());
        helper.setImageDrawable(R.id.itemBrowserImg,item.loadIcon(mContext.getPackageManager()));
    }
}
